import { defineStore } from "pinia";
import { ref } from "vue";

export const useStore = defineStore("useStore", () => {
  const userInfo = ref({
    name: "",
    sex: "",
    Origin: "",
    code: "",
  });

  const bankprocessing = ref({
    Bankcards: "",
    cardtype: "",
    code: "",
  });

  function updateUserInfo(newInfo) {
    userInfo.value = newInfo;
  }
  function updatebankprocessing(newInfo) {
    bankprocessing.value = newInfo;
  }
  return { userInfo, bankprocessing, updateUserInfo, updatebankprocessing };
});
